#pragma once

class FileBuffer
{
	std::vector<ui8> m_data;
public:
	~FileBuffer();
	FileBuffer(CMpqFile& initFile);
	void Write(ui32 pos, ui32 size, void* pData);
	void Read(ui32 pos, ui32 size, void* pOutData);
	void Append(ui32 pos, ui32 size, void* pData);
	void Erase(ui32 pos, ui32 size);
	void SaveToFile(std::string szFileName);
	ui32 GetSize() { return m_data.size(); }
	ui8* GetPointer(ui32 offset) { return &m_data[offset]; }
};